<?php
	session_start();
	if (!isset($_SESSION['kiemtradangnhapthinguyet']) || $_SESSION['kiemtradangnhapthinguyet']!=1) {
		header('location: ../../index.php');
		die;
	}
		
	$table = $_GET["table"];
	$id = $_GET["id"];
	$field = $_GET["field"];
	$value = $_GET["value"];
	
	if ($table!="" && $id!="" && $field!="" && $value!="") {
		settype($id, "int");
		settype($value, "int");
	
		require("../librarys/funs/classdb.php");
		$db = new db;
		$db->update_field_db($table, $id, $field, $value);
	}
?>